<?php
error_reporting(E_ALL);
ini_set('display_errors','On');

require_once("../config.inc.php");

//path to directory to scan
$sDir = RESULTS_DIR;

$aPatches = glob($sDir."*.tgz");
$aOut = array();

foreach ($aPatches as $p) {
	$aOut[basename($p)] = "results/".basename($p);
}

//print each file name
echo json_encode($aOut);
?>